#ifndef __BOMB_H__
#define __BOMB_H__
#include "hero.h"
enum BombType {
	DirectBombT=1,
	EnemyBombT=2,
};

enum BombType bombType;
typedef struct {
	struct V2s pos;
	int maxlife;
	int attack;
	float coldtime;
	int type;
	int moveSpeed;
	int curlife;
	int level;
	int exp;
	float boomAttack;
	int attackRange;
	char info[30];
	char draw[4];
	char name[10];
} BombS;
struct Bomb{
	BombS bombS;
	BombS (*_init)(int x,int y,int type,char name[10]);
	void (*_show)(BombS bombS);

};
extern struct Bomb directB1;


enum Dir {
	eUp=0,
	eDown=1,
	eLeft=2,
	eRight=3,
	eDirSize=4
};
enum Dir eDir;
extern BombS _initBombS(int posx,int posy,int type,char name[20]);
extern int isInAtRangeBomb(BombS org,struct V2s otherV2s);
extern int isInMap(int x, int y);
extern int attackBomb(BombS goS,HeroS *other);
extern void* startBomb(void* arg);
extern void _showBombS(BombS bombS);
extern void showBomb(struct V2s v2s,const char *str);
extern void showBombAttackRange(BombS bombS,char rangeStr[4]);
extern void initBomb(struct V2s pos, int type);
extern void initBombs(struct V2s pos);

extern struct Bomb _bomb;
#endif
